import Vue from 'vue'
import VueRouter from 'vue-router'
import $ from 'jquery'

Vue.use(VueRouter)

export default function() {
	
	var loginOptions = {
		loginPage: "gamsLogin",
		title: '超级计算系统',
		browseIcon:'',
		browseTitle:'',
	};
	var getLoginPage = function(name) {
		return window.$collector.getElement('login', name);
	}
	var routes = []

	var res = window.$collector.getElements('routes');
	if (res) {
		for (var name in res) {
			if (res[name] && !res[name].content) {
				routes.push(res[name]);
			}
		}
	}
    this.getItem = function() {
      return router;
    }	
	const router = new VueRouter({
		routes: routes
	});

}
